package backend

import (
	"dockerview/backend/global/response"
)

func (a *App) UpdateApp() {
	update := new(UpdateApp)
	update.app = a
	update.Run()
}

func (a *App) UpdateCheck() *response.Response {
	update := new(UpdateApp)
	update.app = a
	result := update.Check()
	needUpdate := false
	if result == ">" {
		needUpdate = true
	}
	return response.OkWithDetailed(needUpdate, "查询成功")
}
func (a *App) GetVersion() *response.Response {
	return response.OkWithDetailed(a.AppMeta.AppVersion, "查询成功")
}
